package com.example.chatroom.service;

import com.example.chatroom.mapper.UserMapper;
import com.example.chatroom.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public User getUserByName(String name) {
        return userMapper.getUserByName(name);
    }

    public Integer registry(String username,String password) {
        return userMapper.registry(username,password);
    }
}
